Make sure functions aren't marked as App Services - #41327
Merged
Jeremy Voss (jeremydvoss) merged 3 commits intoMay 29, 2025
Conversation
Jeremy Voss (jeremydvoss)
marked this pull request as ready for review
May 28, 2025 17:45
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR ensures that Azure Functions environments are detected before App Service in the attach logic so Functions sites aren’t misclassified as App Service.
- Reordered conditions in
_is_attach_enabledto check for Functions first, then App Service. - Updated test cases to include
WEBSITE_SITE_NAMEalongsideFUNCTIONS_WORKER_RUNTIME. - Added a CHANGELOG entry for this bug fix.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| _utils.py | Swapped order of _is_on_functions() and _is_on_app_service() checks in _is_attach_enabled. |
| tests/test_utils.py | Added WEBSITE_SITE_NAME to environment patches for Functions tests. |
| CHANGELOG.md | Documented the fix for not counting Functions as App Service. |
Jeremy Voss (jeremydvoss)
force-pushed
the
func-vs-appsvc
branch
from
May 28, 2025 17:46
66c95e5 to
37de78e
Compare
Jeremy Voss (jeremydvoss)
force-pushed
the
func-vs-appsvc
branch
from
May 28, 2025 21:08
dea3ea6 to
adfd29e
Compare
Leighton Chen (lzchen)
approved these changes
May 29, 2025
Jackson Weber (JacksonWeber)
approved these changes
May 29, 2025
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Functions can have WEBSITE_SITENAME. Make sure prefix does not count functions as app services.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines